package demo1;


public class Text_1 {
    public static void main(String[] args) {
        Anima1 anima1  = new Dog("布鲁斯",17);
        anima1.play();
        Dog dog   =  (Dog) anima1;
        dog.play();

 Anima1 anima11 = new Cat("基米",22);


            Dog dog1  = (Dog) anima11;
            dog1.play();


    }

    public static void fun1( Anima1 anima1) {
     anima1.play();
    }
    public static Anima1 fun2(){
        Dog dog   = new Dog("布鲁斯",17);
        return dog;
    }
}
